package cn.abcsys.devops.application.dao;

import cn.abcsys.devops.application.model.ApplicationCore;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository(value="applicationCoreMapper")
public interface ApplicationCoreMapper {
    int deleteByPrimaryKey(Integer applicationCoreId);

    int insert(ApplicationCore record);

    int insertSelective(ApplicationCore record);

    ApplicationCore selectByPrimaryKey(Integer applicationCoreId);

    int updateByPrimaryKeySelective(ApplicationCore record);

    int updateByPrimaryKey(ApplicationCore record);

    List<ApplicationCore> selectByRuntimeAndApplicationName(ApplicationCore record);

    List<ApplicationCore> selectByLittleFields(@Param("record") ApplicationCore record,@Param("page") int page,@Param("rows") int rows);
    List<ApplicationCore> selectByMoreFields(@Param("record") ApplicationCore record,@Param("page") int page,@Param("rows") int rows);
    int selectCountByLittleFields(@Param("record") ApplicationCore record);
    int selectCountByMoreFields(@Param("record") ApplicationCore record);
    int selectRunningCountByMoreFields(@Param("record") ApplicationCore record);

    //last 5:
    List<ApplicationCore> selectByUpdate(@Param("record") ApplicationCore record,@Param("page") int page,@Param("rows") int rows);
    List<ApplicationCore> selectByImageCount(@Param("record") ApplicationCore record,@Param("page") int page,@Param("rows") int rows);
}